4d9f49222ac2cbfbc9a2057a3760ee4c6a0412b2,thymeleaf-spring3/src/main/java/org/thymeleaf/spring3/processor/SpringActionTagProcessor.java,SpringActionTagProcessor,doProcess,#ITemplateContext#IProcessableElementTag#AttributeName#String#Object#IElementTagStructureHandler#,102

Before Change


        newAttributeValue = RequestDataValueProcessorUtils.processAction(context, newAttributeValue, httpMethod);

        // Set the 'action' attribute
        if (attributes instanceof ElementAttributes) {
            ((ElementAttributes) attributes).replaceAttribute(
                    attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue), null);
        } else {
            attributes.replaceAttribute(attributeName, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue));
        }

        // If this th:action is in a <form> tag, we might need to add a hidden field (depending on Spring configuration)

After Change



        String newAttributeValue = HtmlEscape.escapeHtml4Xml(expressionResult == null ? "" : expressionResult.toString());

        final IElementAttributes attributes = tag.getAttributes();

        // But before setting the 'action' attribute, we need to verify the 'method' attribute and let the
        // RequestDataValueProcessor act on it.
        final String httpMethod = attributes.getValue(this.methodAttributeDefinition.getAttributeName());

        // Let RequestDataValueProcessor modify the attribute value if needed
        newAttributeValue = RequestDataValueProcessorUtils.processAction(context, newAttributeValue, httpMethod);

        // Set the 'action' attribute
        StandardProcessorUtils.replaceAttribute(
                attributes, attributeName, this.targetAttributeDefinition, TARGET_ATTR_NAME, (newAttributeValue == null? "" : newAttributeValue));

        // If this th:action is in a <form> tag, we might need to add a hidden field (depending on Spring configuration)
        if ("form".equalsIgnoreCase(tag.getElementName())) {